Skip to content

Fix Internal Server Error from OC\Server::getL10NFactory() when app navigation is enabled#953

Merged
CarlSchwan merged 3 commits into
nextcloud:masterfrom
moskvin:internal-server-error-app-patch
Jul 17, 2026
Merged

Fix Internal Server Error from OC\Server::getL10NFactory() when app navigation is enabled#953
CarlSchwan merged 3 commits into
nextcloud:masterfrom
moskvin:internal-server-error-app-patch

Conversation

@moskvin

@moskvin moskvin commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Fixes an Internal Server Error (HTTP 500) on Nextcloud 34 when the FullTextSearch
navigation entry is enabled. The crash came from a static service-container lookup
(OCP\Server::get(...)/OC\Server::getL10NFactory()) performed while building the
navigation entry, which is unsafe during boot.

Root cause

lib/AppInfo/Application.php resolved the L10N factory and URL generator via the
static container inside fullTextSearchNavigation(). That closure runs only when the
app_navigation config flag is on, so the bug stays hidden on default installs but
500s as soon as navigation is enabled.

How to verify

  1. Enable the app and navigation:
    occ app:enable fulltextsearch && occ config:app:set fulltextsearch app_navigation --value=1
  2. Reload a page with the top nav - renders, no 500.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Related Links

@moskvin
moskvin force-pushed the internal-server-error-app-patch branch from 930d35d to d42c920 Compare June 29, 2026 03:05
@moskvin
moskvin force-pushed the internal-server-error-app-patch branch 2 times, most recently from e4c1421 to 11e7bdd Compare July 10, 2026 02:19
moskvin added 2 commits July 10, 2026 12:20
Signed-off-by: Niko M <nikolay.moskvin@gmail.com>
Signed-off-by: Niko M <nikolay.moskvin@gmail.com>
@moskvin
moskvin force-pushed the internal-server-error-app-patch branch from 11e7bdd to fc9aa5a Compare July 10, 2026 02:20
@moskvin moskvin mentioned this pull request Jul 10, 2026
1 task
@github-actions

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan force-pushed the internal-server-error-app-patch branch from be66ae5 to 146a7f6 Compare July 17, 2026 11:21

@CarlSchwan CarlSchwan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, technically already fixed on master but I prefer your solution

@CarlSchwan
CarlSchwan merged commit 85bf065 into nextcloud:master Jul 17, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants